Skip to main content

Remove-LoggingTarget

SYNOPSIS

Remove a logging target

SYNTAX

ByUniqueName (Default)

Remove-LoggingTarget [[-UniqueName] <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

ByType

Remove-LoggingTarget -Type <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

This function removes a previously configured logging target

EXAMPLES

EXAMPLE 1

Remove-LoggingTarget -UniqueName 'ErrorsOnly'

Removes the target with UniqueName 'ErrorsOnly'

EXAMPLE 2

Remove-LoggingTarget -Name Console

Removes the Console target (backward compatibility)

EXAMPLE 3

Remove-LoggingTarget -Type File

Removes the File target (if only one exists)

PARAMETERS

-UniqueName

The UniqueName of the target to remove. If not specified, removes target by Type name

Type: String
Parameter Sets: ByUniqueName
Aliases: Name

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type

The type of target to remove (used when UniqueName is not specified)

Type: String
Parameter Sets: ByType
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

https://logging.readthedocs.io/en/latest/functions/Remove-LoggingTarget.md

https://logging.readthedocs.io/en/latest/functions/Add-LoggingTarget.md

EDIT THIS DOC

This page was auto-generated from the powershell command comment based help. To edit the content of this page, update the script file comment based help on github Github